chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
  // background 的打印需 在插件页 打开 背景页 来调试
  // console.log('[background-onMessage]', request, sender, sendResponse)
  // chrome.storage.local.set({[request.id] : request.res });
  // 保存数据
  // console.log('[request.id]', request.id)
  // console.log('[request]', request)
  if (request.id && request.res) {
    // 固定本地储存 key
    const RES_KEY = 'res_key'
    chrome.storage.local.set({ [RES_KEY]: request.res }, function() {
      console.log('保存成功')
    })
  }

  sendResponse(true)
})

